package Main;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author bryan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {    
        Integer motivation1 = 1;
        Integer motivation2 = -1;
        if(args.length >= 3){
            motivation1 = Integer.parseInt(args[1]);
            motivation2 =  Integer.parseInt(args[2]);
        }
        Agent agent = new Agent("agent1");
        Environment env;
     
        Interaction it1 = new Interaction("i1");
        Interaction it2 = new Interaction("i2");
        agent.addInteraction(it1, motivation1); 
        agent.addInteraction(it2, motivation2);
        env.addInteraction(it1);
        env.addInteraction(it2);

        Interaction prev_interaction = agent.getBest();
        Interaction curr_interaction;
        int cpt = 0;
        
        while(cpt < 10){
            curr_interaction = agent.step(prev_interaction);
            System.out.print(curr_interaction.getName());System.out.print(" : ");
            prev_interaction = env.step(curr_interaction); 
            System.out.println(prev_interaction.getName());
            cpt++;
        }
    }
}
